<template>
    
<el-aside >
    <el-menu default-active="1-4-1" 
    class="el-menu-vertical-demo" 
    @open="handleOpen" 
    @close="handleClose" 
    :collapse="isCollapse" 
    background-color="#545c64"
    text-color="#fff"
    active-text-color="#ffd04b">
            <router-link to="/Home">
             <!-- 路由跳转 -->
            <el-menu-item index="1" >
                <i class="el-icon-menu"></i>
                <span slot="title">首页</span>
                  
            </el-menu-item>
          
          </router-link>

          
            <el-submenu index="2">
                <template slot="title">
                    <i class="el-icon-location"></i>
                    <span slot="title">软件管理</span>
                </template>
                <el-menu-item-group> 
                  <!-- <span slot="title">分组一</span> -->
                  <router-link to="/User1">
                  <el-menu-item index="2-1">已拥有软件</el-menu-item>
                  </router-link>

                  <router-link to="/User2">
                  <el-menu-item index="2-2">问题反馈</el-menu-item>
                  </router-link>
                   
                  <router-link to="/User3">
                  <el-menu-item index="2-3">查看处理状态</el-menu-item>
                  </router-link>
                </el-menu-item-group>
            </el-submenu>

            <el-submenu index="3">
                <template slot="title">
                    <i class="el-icon-user"></i>
                    <span slot="title">账号管理</span>
                </template>
                <el-menu-item-group> 
                  <router-link to="/User4">
                  <el-menu-item index="3-1">个人信息</el-menu-item>
                  </router-link>

                  <el-menu-item index="3-2">修改信息</el-menu-item>
                  <el-menu-item index="3-3">修改密码</el-menu-item>
                </el-menu-item-group>
            </el-submenu>

            <el-submenu index="4">
                <template slot="title">
                    <i class="el-icon-warning-outline"></i>
                    <span slot="title">FAQ</span>
                </template>
                <el-menu-item-group>
                  <el-menu-item index="4-1">常见问题</el-menu-item>
                </el-menu-item-group>
            </el-submenu>

    </el-menu>
</el-aside>
</template>

  <style>

    .el-menu-vertical-demo{
      height: 100vh;
    }/*导航菜单样式  */

    .el-menu-vertical-demo:not(.el-menu--collapse) {
      width: 200px;
      min-height: 400px;
    }
    .el-aside::-webkit-scrollbar {
      display: none;
    }/*去除滑块  */

    /*设置router-link点击前的样式 */
    a{
      text-decoration: none;
      color: #000;
      }
    /*设置点击后的样式 */
    .router-link-active {
        text-decoration: none;
        color: red;
      }

  </style>
  
  <script>
    export default {
      data() {
        return {
          isCollapse: false //关闭默认菜单收起
          
        };
      },
      methods: {
        handleOpen(key, keyPath) {
          console.log(key, keyPath);
        },
        handleClose(key, keyPath) {
          console.log(key, keyPath);
        },
       
      }
    }
  </script>